<?php

declare(strict_types=1);

namespace App\Events;

class Tcp
{
    public static function onReceive(\Swoole\Server $server, int $fd, int $reactorId, string $data)
    {
        echo "[#" . $server->worker_id . "]\tClient[$fd]: $data\n";
    }

    public static function onClose(\Swoole\Server $server, int $fd, int $reactorId)
    {
        echo "[#" . $server->worker_id . "]\tClient[$fd] close\n";
    }
}